#!/bin/bash
set -o nounset                              # Treat unset variables as an error
echo '
set terminal epslatex color colortext
set output "watt_128_streams_final.tex"
 set title "Network speed with 128 streams"
f(x) = mean_y
fit f(x) "data/watt_128_streams_final" u 1:3 via mean_y
set key off
      set xlabel "Time(s)"
      set ylabel "Mb/s"
      set logscale y 2
      set label 3 gprintf("Mean = %gMb/s", mean_y) at  60,5000
      plot "data/watt_128_streams_final" using 1:3 with line title "Total","data/watt_128_streams_final" using 1:9 with line title "single0","data/watt_128_streams_final" using 1:10 with line title "single1","data/watt_128_streams_final" using 1:11 with line title "single2","data/watt_128_streams_final" using 1:12 with line title "single3","data/watt_128_streams_final" using 1:13 with line title "single4","data/watt_128_streams_final" using 1:14 with line title "single5","data/watt_128_streams_final" using 1:15 with line title "single6","data/watt_128_streams_final" using 1:16 with line title "single7","data/watt_128_streams_final" using 1:17 with line title "single8","data/watt_128_streams_final" using 1:18 with line title "single9","data/watt_128_streams_final" using 1:19 with line title "single10","data/watt_128_streams_final" using 1:20 with line title "single11","data/watt_128_streams_final" using 1:21 with line title "single12","data/watt_128_streams_final" using 1:22 with line title "single13","data/watt_128_streams_final" using 1:23 with line title "single14","data/watt_128_streams_final" using 1:24 with line title "single15","data/watt_128_streams_final" using 1:25 with line title "single16","data/watt_128_streams_final" using 1:26 with line title "single17","data/watt_128_streams_final" using 1:27 with line title "single18","data/watt_128_streams_final" using 1:28 with line title "single19","data/watt_128_streams_final" using 1:29 with line title "single20","data/watt_128_streams_final" using 1:30 with line title "single21","data/watt_128_streams_final" using 1:31 with line title "single22","data/watt_128_streams_final" using 1:32 with line title "single23","data/watt_128_streams_final" using 1:33 with line title "single24","data/watt_128_streams_final" using 1:34 with line title "single25","data/watt_128_streams_final" using 1:35 with line title "single26","data/watt_128_streams_final" using 1:36 with line title "single27","data/watt_128_streams_final" using 1:37 with line title "single28","data/watt_128_streams_final" using 1:38 with line title "single29","data/watt_128_streams_final" using 1:39 with line title "single30","data/watt_128_streams_final" using 1:40 with line title "single31","data/watt_128_streams_final" using 1:41 with line title "single32","data/watt_128_streams_final" using 1:42 with line title "single33","data/watt_128_streams_final" using 1:43 with line title "single34","data/watt_128_streams_final" using 1:44 with line title "single35","data/watt_128_streams_final" using 1:45 with line title "single36","data/watt_128_streams_final" using 1:46 with line title "single37","data/watt_128_streams_final" using 1:47 with line title "single38","data/watt_128_streams_final" using 1:48 with line title "single39","data/watt_128_streams_final" using 1:49 with line title "single40","data/watt_128_streams_final" using 1:50 with line title "single41","data/watt_128_streams_final" using 1:51 with line title "single42","data/watt_128_streams_final" using 1:52 with line title "single43","data/watt_128_streams_final" using 1:53 with line title "single44","data/watt_128_streams_final" using 1:54 with line title "single45","data/watt_128_streams_final" using 1:55 with line title "single46","data/watt_128_streams_final" using 1:56 with line title "single47","data/watt_128_streams_final" using 1:57 with line title "single48","data/watt_128_streams_final" using 1:58 with line title "single49","data/watt_128_streams_final" using 1:59 with line title "single50","data/watt_128_streams_final" using 1:60 with line title "single51","data/watt_128_streams_final" using 1:61 with line title "single52","data/watt_128_streams_final" using 1:62 with line title "single53","data/watt_128_streams_final" using 1:63 with line title "single54","data/watt_128_streams_final" using 1:64 with line title "single55","data/watt_128_streams_final" using 1:65 with line title "single56","data/watt_128_streams_final" using 1:66 with line title "single57","data/watt_128_streams_final" using 1:67 with line title "single58","data/watt_128_streams_final" using 1:68 with line title "single59","data/watt_128_streams_final" using 1:69 with line title "single60","data/watt_128_streams_final" using 1:70 with line title "single61","data/watt_128_streams_final" using 1:71 with line title "single62","data/watt_128_streams_final" using 1:72 with line title "single63","data/watt_128_streams_final" using 1:73 with line title "single64","data/watt_128_streams_final" using 1:74 with line title "single65","data/watt_128_streams_final" using 1:75 with line title "single66","data/watt_128_streams_final" using 1:76 with line title "single67","data/watt_128_streams_final" using 1:77 with line title "single68","data/watt_128_streams_final" using 1:78 with line title "single69","data/watt_128_streams_final" using 1:79 with line title "single70","data/watt_128_streams_final" using 1:80 with line title "single71","data/watt_128_streams_final" using 1:81 with line title "single72","data/watt_128_streams_final" using 1:82 with line title "single73","data/watt_128_streams_final" using 1:83 with line title "single74","data/watt_128_streams_final" using 1:84 with line title "single75","data/watt_128_streams_final" using 1:85 with line title "single76","data/watt_128_streams_final" using 1:86 with line title "single77","data/watt_128_streams_final" using 1:87 with line title "single78","data/watt_128_streams_final" using 1:88 with line title "single79","data/watt_128_streams_final" using 1:89 with line title "single80","data/watt_128_streams_final" using 1:90 with line title "single81","data/watt_128_streams_final" using 1:91 with line title "single82","data/watt_128_streams_final" using 1:92 with line title "single83","data/watt_128_streams_final" using 1:93 with line title "single84","data/watt_128_streams_final" using 1:94 with line title "single85","data/watt_128_streams_final" using 1:95 with line title "single86","data/watt_128_streams_final" using 1:96 with line title "single87","data/watt_128_streams_final" using 1:97 with line title "single88","data/watt_128_streams_final" using 1:98 with line title "single89","data/watt_128_streams_final" using 1:99 with line title "single90","data/watt_128_streams_final" using 1:100 with line title "single91","data/watt_128_streams_final" using 1:101 with line title "single92","data/watt_128_streams_final" using 1:102 with line title "single93","data/watt_128_streams_final" using 1:103 with line title "single94","data/watt_128_streams_final" using 1:104 with line title "single95","data/watt_128_streams_final" using 1:105 with line title "single96","data/watt_128_streams_final" using 1:106 with line title "single97","data/watt_128_streams_final" using 1:107 with line title "single98","data/watt_128_streams_final" using 1:108 with line title "single99","data/watt_128_streams_final" using 1:109 with line title "single100","data/watt_128_streams_final" using 1:110 with line title "single101","data/watt_128_streams_final" using 1:111 with line title "single102","data/watt_128_streams_final" using 1:112 with line title "single103","data/watt_128_streams_final" using 1:113 with line title "single104","data/watt_128_streams_final" using 1:114 with line title "single105","data/watt_128_streams_final" using 1:115 with line title "single106","data/watt_128_streams_final" using 1:116 with line title "single107","data/watt_128_streams_final" using 1:117 with line title "single108","data/watt_128_streams_final" using 1:118 with line title "single109","data/watt_128_streams_final" using 1:119 with line title "single110","data/watt_128_streams_final" using 1:120 with line title "single111","data/watt_128_streams_final" using 1:121 with line title "single112","data/watt_128_streams_final" using 1:122 with line title "single113","data/watt_128_streams_final" using 1:123 with line title "single114","data/watt_128_streams_final" using 1:124 with line title "single115","data/watt_128_streams_final" using 1:125 with line title "single116","data/watt_128_streams_final" using 1:126 with line title "single117","data/watt_128_streams_final" using 1:127 with line title "single118","data/watt_128_streams_final" using 1:128 with line title "single119","data/watt_128_streams_final" using 1:129 with line title "single120","data/watt_128_streams_final" using 1:130 with line title "single121","data/watt_128_streams_final" using 1:131 with line title "single122","data/watt_128_streams_final" using 1:132 with line title "single123","data/watt_128_streams_final" using 1:133 with line title "single124","data/watt_128_streams_final" using 1:134 with line title "single125","data/watt_128_streams_final" using 1:135 with line title "single126","data/watt_128_streams_final" using 1:136 with line title "single127"
      
' |gnuplot -persist      
